package top.qiuzhe.utils;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.attribute.BasicFileAttributes;

/**
 * @program: DocsifyManage
 * @description:
 * @author: qiuzhe
 * @create: 2022-03-23 12:17
 **/
public class Utils {

    private Utils(){ }
    /**
     * 获取文件一些基本信息
     * @param path
     * @return
     * @throws IOException
     */
    public static BasicFileAttributes getFileBaseInfo(String path) throws IOException {
        return Files.readAttributes(Paths.get(path), BasicFileAttributes.class);
    }

}